<html>
<head><meta charset="utf-8"><title>--no-default-features + -p · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/--no-default-features.20.2B.20-p.html">--no-default-features + -p</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="203582259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/--no-default-features%20%2B%20-p/near/203582259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/--no-default-features.20.2B.20-p.html#203582259">(Jul 11 2020 at 05:44)</a>:</h4>
<div class="codehilite"><pre><span></span><code>error: --no-default-features is not allowed in the root of a virtual workspace
note: while this was previously accepted, it didn&#39;t actually do anything
</code></pre></div>


<p>would it be possible to allow this when <code>-p</code> is passed? and have it affect the specified crate?</p>



<a name="203582694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/--no-default-features%20%2B%20-p/near/203582694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/--no-default-features.20.2B.20-p.html#203582694">(Jul 11 2020 at 06:00)</a>:</h4>
<p>it works fine by running it in the directory of the package I was passing to <code>-p</code>, it's just inconvenient</p>



<a name="203583263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/--no-default-features%20%2B%20-p/near/203583263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/--no-default-features.20.2B.20-p.html#203583263">(Jul 11 2020 at 06:21)</a>:</h4>
<p>oh I randomly came across <a href="https://github.com/rust-lang/cargo/issues/5364">https://github.com/rust-lang/cargo/issues/5364</a>, seems relevant</p>



<a name="203583369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/--no-default-features%20%2B%20-p/near/203583369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/--no-default-features.20.2B.20-p.html#203583369">(Jul 11 2020 at 06:24)</a>:</h4>
<p>maybe the error should mention <code>-Z package-features</code>?</p>



<a name="203583424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/--no-default-features%20%2B%20-p/near/203583424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/--no-default-features.20.2B.20-p.html#203583424">(Jul 11 2020 at 06:27)</a>:</h4>
<p>interesting development <a href="https://github.com/rust-lang/cargo/issues/8088#issuecomment-618758367">https://github.com/rust-lang/cargo/issues/8088#issuecomment-618758367</a></p>



<a name="203587162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/--no-default-features%20%2B%20-p/near/203587162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/--no-default-features.20.2B.20-p.html#203587162">(Jul 11 2020 at 08:32)</a>:</h4>
<p>Yeah, <em>just</em> doing that inflicts the wrath of backwards compatibility gods :D</p>
<p>And yes, <code>-Z package-features</code> is a central effort to fix this properly</p>



<a name="203590708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/--no-default-features%20%2B%20-p/near/203590708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/--no-default-features.20.2B.20-p.html#203590708">(Jul 11 2020 at 10:32)</a>:</h4>
<p>I also found <a href="https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#resolver">https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#resolver</a></p>



<a name="203590723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/--no-default-features%20%2B%20-p/near/203590723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/--no-default-features.20.2B.20-p.html#203590723">(Jul 11 2020 at 10:33)</a>:</h4>
<p>all of this is going to make hacking on a couple very large codebases which have to do weird wasm builds, so much nicer</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>